<template>
  <div>
    <van-dialog v-model="visiable"
      width="300px"
      :title="item.title"
      :message="item.info"
      :close-on-click-overlay="true"
      @close="close">
      <template>
        <div class="van-dialog__message">{{item.info}}</div>

        <div v-if="item.deadLine" class="van-dialog__message">计划于 {{item.deadLine}} 完成</div>
      </template>
    </van-dialog>
  </div>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
      default: () => false
    },
    item: {
      type: Object,
      default: () => {}
    }
  },
  data () {
    return {
      visiable: false
    }
  },
  watch: {
    show (val) {
      this.visiable = this.show
    }
  },
  methods: {
    close () {
      this.$emit('update:show', false)
    }
  }
}
</script>
 <style lang="scss" scoped>

 </style>
